//
//  CRSA.h
//  Ebochuanbu
//
//  Created by Ebo on 15/12/14.
//  Copyright © 2015年 chuanbu. All rights reserved.
//

#import <Foundation/Foundation.h>

//#include "rsa.h"
//#include "pem.h"
//#include "err.h"

#include <openssl/rsa.h>
#include <openssl/pem.h>
#include <openssl/err.h>

typedef enum {
    EBOKeyTypePublic,
    EBOKeyTypePrivate
}EBOKeyType;


@interface EBOrsa : NSObject{
    RSA *_rsa;
}

+ (id)shareInstance;

- (BOOL)importRSAKeyWithType:(EBOKeyType)type;

- (NSString *) encryptByRsa:(NSString*)content withKeyType:(EBOKeyType)keyType;

- (NSString *) decryptByRsa:(NSString*)content withKeyType:(EBOKeyType)keyType;

@end
